% EPC flow charts
% Author: Fabian Schuh
\documentclass{paper}

\usepackage[utf8]{inputenc}
\usepackage[english, russian]{babel}


\usepackage{pgf}
\usepackage{tikz}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>

\usepackage[utf8]{inputenc}
\usetikzlibrary{arrows,automata}
\usetikzlibrary{positioning}


\tikzset{
    state/.style={
           rectangle,
           minimum size=0.8cm,
           fill=blue!10, 
           draw=black, 
           inner sep=4pt,
           text centered,
           font=\fontsize{12}{12}\selectfont
           },	
    box/.style={
           rectangle,
           minimum size=0.7cm,          
           draw=black, 
           inner sep=4pt,
           text centered,
           },	
     pil/.style={
           >=latex',
           very thick,
           draw=black, 
           shorten <=1pt,
           shorten >=1pt}
}

\begin{document}

\begin{tikzpicture}

\newcommand{\boxesLineH}[3] {
    \begin{scope}[shift={#1}]
        \foreach \x in {1,...,8} {
          \node[state] at (\x * 0.8 cm, 0) {\x};
        }
    \end{scope}
}



\boxesLineH{(0, 0)};

\path[->, pil] (1 * 0.8, -0.4) -- (1 * 0.8, -2.6);
\path[->, pil] (2 * 0.8, -0.4) -- (2 * 0.8, -2.6);
\path[->, pil] (3 * 0.8, -0.4) -- (3 * 0.8, -2.6);
\path[->, pil] (4 * 0.8, -0.4) -- (4 * 0.8, -2.6);
\path[->, pil] (5 * 0.8, -0.4) -- (5 * 0.8, -2.6);
\path[->, pil] (6 * 0.8, -0.4) -- (6 * 0.8, -2.6);
\path[->, pil] (7 * 0.8, -0.4) -- (7 * 0.8, -2.6);
\path[->, pil] (8 * 0.8, -0.4) -- (8 * 0.8, -2.6);


\node[state] at (1 * 0.8 cm, -3) {1};
\node[state] at (2 * 0.8 cm, -3) {2};
\node[state, fill = white] at (3 * 0.8 cm, -3) {3};
\node[state] at (4 * 0.8 cm, -3) {4};
\node[state, fill = white] at (5 * 0.8 cm, -3) {5};
\node[state] at (6 * 0.8 cm, -3) {6};
\node[state] at (7 * 0.8 cm, -3) {7};
\node[state, fill = white] at (8 * 0.8 cm, -3) {8};

\path[->, pil] (1 * 0.8, -3.4) -- (1 * 0.8, -5.6);
\path[->, pil] (2 * 0.8, -3.4) -- (2 * 0.8, -5.6);
\path[->, pil] (2 * 0.8, -3.4) -- (3 * 0.8, -5.6);
\path[->, pil] (4 * 0.8, -3.4) -- (4 * 0.8, -5.6);
\path[->, pil] (4 * 0.8, -3.4) -- (5 * 0.8, -5.6);
\path[->, pil] (6 * 0.8, -3.4) -- (6 * 0.8, -5.6);
\path[->, pil] (7 * 0.8, -3.4) -- (7 * 0.8, -5.6);
\path[->, pil] (7 * 0.8, -3.4) -- (8 * 0.8, -5.6);


\boxesLineH{(0, -6)};


\end{tikzpicture}

\end{document}
